Intelligent flash reprogramming

ABSTRACT

Apparatus, methods, and computer-readable media for programming, reading, and servicing non-volatile storage device to improve data retention time and data density are disclosed. According to one embodiment, a method of managing a non-volatile memory storage device includes generating output values based on an expected pattern of discrete states stored in memory cells of the storage device, comparing output values for the memory cells to expected output values using a pre-selected threshold, and based on the comparing, programming other memory cells of the storage device to refresh the programming of the other memory cells. Methods of performing service and management operations for interrupting a host system coupled a non-volatile memory storage device are also disclosed.

FIELD

The present disclosure pertains to apparatus and methods for usingstorage devices incorporating non-volatile memory, includingprogramming, reading, and servicing of such devices.

BACKGROUND

Non-volatile memory technologies, including Flash memory (e.g., NOR- andNAND-type flash memory), EEPROM (Electrically Erasable Programmable ReadOnly Memory), FRAM (Ferroelectric Random Access Memory), MRAM(Magneto-resistive Random Access Memory), PRAM (Phase Change RandomAccess Memory), and bubble memory can be used to store data (includingcomputer-executable instructions) in everyday computing devices. Onceprogrammed, non-volatile memories have a common property of being ableto retain data for relatively long durations of time without beingpowered. However, all non-volatile memories still tend to eventuallylose their stored programmed data. For example, depending on thetechnology used to implement flash memory cells, reliable data storagedurations can range from 2-3 years, up to 10 years.

SUMMARY

The present application discloses apparatus, articles of manufacture,and methods for programming test patterns of data and date/timeinformation when storing data in non-volatile memory (e.g., flashmemory) of a non-volatile storage device (e.g., a flash memory “stick”or a solid-state drive). In some examples, a non-volatile storage devicestores computer-executable instructions (e.g., firmware) that cancompare date information when all or a portion of memory cells in anon-volatile memory are programmed. If the date (when at least a portionof the memory cells were programmed) exceeds a service life for datastored in the memory cells, those memory cells, or other memory cells inthe storage device, can be reprogrammed. This reprogramming refreshesthe data stored in the memory cells, further extending the duration forwhich the data can be reliably retrieved. In some examples,reprogramming of the memory cells can be coordinated with service and/ormaintenance event notifications initiated by the non-volatile storagedevice and/or a host computer coupled to the non-volatile storagedevice.

Apparatus, articles of manufacture, and methods disclosed herein can beused to reprogram non-volatile memory before data stored in the memoryis lost. In some examples, non-volatile memory can be managed using amicrocontroller, processor, or other logic included with a non-volatilestorage device. In some examples, non-volatile memory can be managedusing an external computer, such as a host PC, mobile device, smartphone, or other suitable devices coupled with a non-volatile storagedevice. In some examples, the density of bits stored per memory cell canbe increased, as using embodiments of the disclosed techniques forservice, maintenance, and/or reprogramming of memory cells can improvethe reliability of the non-volatile memory relative to techniques thatrely on stored data to remain readable throughout a specified lifecycle,without maintenance.

In some examples of the disclosed technology, non-volatile storagedevices (e.g., a flash memory storage device) can store multiple bits ofdata per memory cell by storing differing amounts of charge in a cell torepresent different discrete states. When the memory cell is read, anoutput value (e.g., read as a cell voltage, current, or other suitableelectrical property) is measured to determine a discrete output statefor the cell. For example, 1-bit memory cells can be programmed suchthat an output voltage of 0 to 0.5 Volts represents a logic 0 bit, andanything higher than a threshold of 0.5 V (e.g., any voltage outputvalue between 0.5 V and a maximum of output value of 5 V) represents alogic 1 bit. In some examples of flash memory, blocks of bits are erasedto output logic 1 bits, and then individual memory cells can beprogrammed such that their corresponding voltage output level is below0.5 volts (e.g., logic 0 bits).

In multi-bit memory cells, more than two voltage ranges can be used torepresent logic values. For example, in a 2-bit memory cell with voltageoutput values varying between 0 and 4 Volts, output values could beencoded such that 0-1 V represents 00 b (0 decimal), 1-2 V represents 01b (1 decimal), 2-3 V represents 10 b (2 decimal), and 3-4 V represents11 b (3 decimal). However, because the memory cells in certainnon-volatile storage devices, such as flash memory, tend to lose chargeover time, the duration during which data can be reliably stored in aknown voltage state is reduced over a comparable 1-bit memory, becausethe range of the voltage output levels is narrower and thus moresusceptible to read errors caused by device variation and loss ofstorage charge over time.

Therefore, the memory cells of a multi-bit memory array should berecharged and reprogrammed more frequently to avoid data loss. However,memory cells of a non-volatile memory also tend to “wear down” with eachsubsequent reprogramming, until the cells are no longer able to reliablystore charge for a specified duration of time. Thus, excessivereprogramming of non-volatile memory cells should generally be avoided.By storing a number of test patterns, data information, otherinformation regarding discrete states stored in a non-volatile storagedevice, and/or date information indicating when that data is stored inthe non-volatile storage device, data retention times can be improved,additional bits can be stored per memory cell, and/or specified storagelifetimes for memory cells can be increased.

In some examples of the disclosed technology, a method of managingmemory cells storing data in a non-volatile memory device comprisesgenerating one or more output values from a first set of memory cells ofthe non-volatile memory device being based on one or more valuespreviously stored in the memory cells based on an expected pattern ofone or more discrete states, comparing the output values to one or moreexpected output values based on the expected pattern using apre-selected threshold, and based at least in part on the comparing,programming a second set of one or more memory cells of the non-volatilememory device to store the data in the second set of memory cells.

In some examples, a method of managing memory cells includes storingvalues based on the expected pattern of one or more discrete states inthe first set of memory cells. In some examples, the expected pattern isindependent of the stored data in the second set of memory cells. Insome examples, the expected pattern is based on an error-correcting code(ECC) for the stored data in the second set of memory cells.

In some examples disclosed herein, generating output values comprisesmeasuring an electrical property of at least one cell of a first set ofcells. In some examples, expected output values are nominal outputvalues expected to be generated by cells of a non-volatile memory devicewhen programmed with an expected pattern.

In some examples disclosed herein, a non-volatile memory device includesone or more pages of physical memory, where a page of physical memory isthe smallest unit of the non-volatile memory device that can be erased,the pages of physical memory include two or more sectors of physicalmemory, and each cell of a first set of cells is located inidentically-addressed respective sectors relative to each respectivepage of physical memory included in a non-volatile memory device.

In some examples disclosed herein, a method further comprises generatinga first set of output values and a second set of output values from aset of memory cells, the second output values being based onpreviously-stored values, and where comparing the values includescomparing the first output values, the second output values, a dateassociated with when the first output values were generated, a dateassociated with when the second output values were generated, and theexpected output values using a pre-selected threshold.

In some examples disclosed herein, a pre-selected threshold is based ona tolerance value for an electrical property of the non-volatile memorydevice. In some examples disclosed herein, one or more computer-readablestorage media store computer-readable instructions that when executed bya processor, cause the processor to perform one or more of the methodsdisclosed herein.

In some examples of the disclosed technology, a method of servicing amemory device coupled to a computing system includes determining whetherto service a first unit of the memory device by evaluating a datapattern and one or more output values generated by reading one or morememory cells of a second unit of the memory device, the memory cells ofthe second set being previously programmed to store the data pattern,based on the determining, sending a first signal to the computing systemindicating that the memory device is to be serviced, receiving a secondsignal from the computing system indicating that the memory device canbe safely serviced, and based the receiving, servicing the memory deviceby restoring programming of one or more memory cells of the first unit.

In some examples disclosed herein, a method of servicing a memory deviceincludes receiving system date information from the computing system,wherein the determining comprises comparing the system date informationto date information associated with the second unit. In some examples,one or more of the output values are based on a voltage level output byat least one of the memory cells of the second unit.

In some examples disclosed herein, determining whether to service amemory device comprises determining a first timestamp indicating whenthe data pattern was stored in the second unit, determining a secondtimestamp indicating when data was stored in the first unit, anddetermining that at least one of the units is to be serviced bycomparing the first timestamp and the second timestamp.

In some examples disclosed herein, a method of servicing a memory deviceincludes receiving data to be stored in the memory device from thecomputing system, receiving a first timestamp from the computing system,and storing the received data in the first unit, the data pattern in thesecond unit, and the first timestamp in one or more of the memory cells.In some examples, a logical address for storing the received data in thefirst unit and a logical address for storing the data pattern in thesecond unit are not determined by the computing system.

In some examples of the disclosed technology, a storage device includesa memory array, a memory controller, and a hardware interface, whereinthe memory array comprises one or more non-volatile memory cells, thehardware interface is operable to receive data to be stored in thememory cells from a computer system coupled to the hardware interface,and the memory controller is operable to maintain the received data whenstored in the non-volatile memory cells using a method that includesstoring the received data in at least one of the non-volatile memorycells, designated data cells, storing a data pattern in at least one ofthe non-volatile memory cells, designated pattern cells, reading anoutput value from at least one of the designated pattern cells,comparing the output value to an expected output value based on the datapattern using a pre-selected threshold, and if the comparing indicatesthat the pre-selected threshold is exceeded, maintaining the receiveddata by repeating the storing of the received data.

In some examples, a method using a memory controller includes receivingdate information representing a date associated with received data andstoring at least a portion of the date information in a memory array,where comparing timestamps is based at least in part on the receiveddate information.

In some examples, a method using a memory controller includes providinga first indication that the storage device will be in an inaccessiblestate, receiving a signal from a computing system coupled to thehardware interface indicating that the memory controller can proceedwith the repeating the storing the received data, where the computingsystem generates the signal responsive to the provided indication, basedon receiving the signal, repeating the storing of the received data, andafter repeating the storing, providing a second indication that thestorage device is not in the inaccessible state.

The foregoing and other objects, features, and advantages of thedisclosed technology will become more apparent from the followingdetailed description, which proceeds with reference to the accompanyingfigures.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flow chart that outlines an exemplary implementation of thedisclosed technology.

FIG. 2A is a diagram depicting data stored in a portion of anon-volatile memory in an exemplary implementation of the disclosedtechnology.

FIG. 2B is a generalized histogram illustrating voltage output levels ina memory array of 1-bit non-volatile memory cells.

FIG. 2C is a generalized histogram illustrating voltage output levels inan array of 2-bit non-volatile memory cells.

FIG. 3A is a diagram depicting data including test patterns stored in aportion of a 1-bit non-volatile memory in an exemplary implementation ofthe disclosed technology.

FIG. 3B is a diagram depicting data including test patterns stored in aportion of a 2-bit non-volatile memory in an exemplary implementation ofthe disclosed technology.

FIG. 4 is a diagram depicting data including test patterns, dates, andunprogrammed memory cells stored in a portion of a 1-bit non-volatilememory in an exemplary implementation of the disclosed technology.

FIG. 5 is a diagram illustrating a memory configuration storing testpatterns in an exemplary implementation of the disclosed technology.

FIG. 6 is a diagram illustrating a memory configuration storing testpatterns in an exemplary implementation of the disclosed technology.

FIG. 7 is a flow chart that further details the example implementationillustrated in FIG. 1.

FIG. 8 is a flow chart that outlines an example implementation of thedisclosed technology.

FIG. 9 is a flow chart that further details the example implementationillustrated in FIG. 8.

FIG. 10 is a block diagram that illustrates a non-volatile storagedevice, including a memory controller, non-volatile memory array, and ahardware interface, the storage device being coupled to a host computingsystem.

FIG. 11 is a block diagram that illustrates a generalized example of asuitable computing environment in which described embodiments,techniques, and technologies can be implemented.

DETAILED DESCRIPTION

This disclosure is set forth in the context of representativeembodiments that are not intended to be limiting in any way.

As used in this application and in the claims, the singular forms “a,”“an,” and “the” include the plural forms unless the context clearlydictates otherwise. Additionally, the term “includes” means “comprises.”

The systems, methods, and apparatus disclosed herein should not beconstrued as being limiting in any way. Instead, this disclosure isdirected toward all novel and non-obvious features and aspects of thevarious disclosed embodiments, alone and in various combinations andsub-combinations with one another. The disclosed systems, methods, andapparatus are not limited to any specific aspect or feature orcombinations thereof, nor do the disclosed systems, methods, andapparatus require that any one or more specific advantages be present orproblems be solved. Furthermore, any features or aspects of thedisclosed embodiments can be used in various combinations andsub-combinations with one another. Furthermore, as used herein, the term“and/or” means any one item or combination of items in the phrase.

Although the operations of some of the disclosed methods are describedin a particular, sequential order for convenient presentation, it shouldbe understood that this manner of description encompasses rearrangement,unless a particular ordering is required by specific language set forthbelow. For example, operations described sequentially may in some casesbe rearranged, omitted, or performed concurrently. Moreover, for thesake of simplicity, the attached figures may not show the various waysin which the disclosed systems, methods, and apparatus can be used inconjunction with other systems, methods, and apparatus. Additionally,the description sometimes uses terms like “produce,” “generate,”“select,” “measure,” “search,” and “provide” to describe the disclosedmethods. These terms are high-level abstractions of the actualoperations that are performed. The actual operations that correspond tothese terms can vary depending on the particular implementation and arereadily discernible by one of ordinary skill in the art.

Some of the disclosed methods can be implemented as computer-executableinstructions stored on one or more computer-readable storage media(e.g., non-transitory computer-readable media, such as one or morevolatile memory components (such as DRAM or SRAM), or nonvolatile memorycomponents (such as flash memory or hard drives) and executed on acomputer (e.g., any suitable computer, including smart phones or othermobile devices that include computing hardware). Any of thecomputer-executable instructions for implementing the disclosedtechniques as well as any data created and used during implementation ofthe disclosed embodiments can be stored on one or more computer-readablemedia (e.g., non-transitory computer-readable media). Thecomputer-executable instructions can be part of, for example, adedicated software application or a software application that isaccessed or downloaded via a web browser or other software application(such as a remote computing application). Such software can be executed,for example, on a single local computer (e.g., any suitable commerciallyavailable computer) or in a network environment (e.g., via the Internet,a wide-area network, a local-area network, a client-server network (suchas a cloud computing network), or other such network) using one or morenetwork computers.

For clarity, only certain selected aspects of the software-basedimplementations are described. Other details that are well known in theart are omitted. For example, it should be understood that the disclosedtechnology is not limited to any specific computer language or program.For instance, the disclosed technology can be implemented by softwarewritten in assembly language, C, C++, or any other suitable programminglanguage. Likewise, the disclosed technology is not limited to anyparticular computer or type of hardware. Certain details of suitablecomputers and hardware are well-known and need not be set forth indetail in this disclosure.

Furthermore, any of the software-based embodiments (comprising, forexample, computer-executable instructions for causing a computer toperform any of the disclosed methods) can be uploaded, downloaded, orremotely accessed through a suitable communication means. Such suitablecommunication means include, for example, the Internet, the World WideWeb, an intranet, software applications, cable (including fiber opticcable), magnetic communications, electromagnetic communications(including RF, microwave, and infrared communications), electroniccommunications, or other such communication means.

Theories of operation, scientific principles, or other theoreticaldescriptions presented herein in reference to the systems, methods, andapparatus of this disclosure have been provided for the purposes ofbetter understanding and are not intended to be limiting in scope. Thesystems, methods, and apparatus in the appended claims are not limitedto those systems, methods, and apparatus that function in the mannerdescribed by such theories of operation.

Example Generation of Output Values Based on an Expected Pattern

FIG. 1 is a flow chart 100 that outlines an exemplary method ofgenerating output values from a first set of memory cells based on apreviously-stored expected pattern and programming a second set ofmemory cells based on a comparison of the output values and the expectedpattern. In some examples, a non-volatile storage device includes anumber of non-volatile memory arrays that include a number of memorycells, which are the basic storage units of the memory arrays. In someexamples of non-volatile storage devices, a memory controller (e.g., amicrocontroller or a microprocessor) is included for programming andreading data from the memory arrays. In some examples of non-volatilestorage devices, an implementation of a hardware interface (e.g., a USBor CFI interface) is included for communicating with a host device(e.g., a PC or smartphone).

At process block 110, a number of output values are generated from afirst set of memory cells storing an expected pattern of discretestates. Output values can be generated by measuring an output voltage ofthe memory cells. In other examples, voltage output values are notexplicitly generated, but instead can be determined using a senseamplifier, comparator, or other suitable technology to generate discreteoutput values based on a pre-selected threshold. The pre-selectedthreshold can be based on a tolerance value for an electrical propertyof the non-volatile memory array. For example, a reference voltage(e.g., reference voltages V_(R) and V_(R1)-V_(R3), as shown below inFIGS. 2B and 2C, respectively) can be used, or a different voltage valueselected at a point where the memory cells of the memory array aredetermined to output their state reliably.

By way of example, one byte of memory cells, each capable of storing 1bit of data, can be programmed to store an expected pattern of“10100101” (in binary code). Voltage output values generated from onebyte storing 10100101 b could be 3.3, 0.0, 3.2, 0.1, 0.1, 3.0, 0.5, and3.2 Volts (V), respectively, in a flash memory with nominal outputvoltages of 0.0 and 3.3 Volts for logic 0 and logic 1, respectively. Asused herein, a “nominal” output voltage refers to a specified outputvoltage for a given memory array. For example, cells in a memory arrayspecified to output nominal voltages of 0.0 and 3.3 V might outputactual voltages of 0.05 V and 3.35 V. A nominal output voltage isfrequently, but not necessarily, the median of output voltages observedfor memory cells programmed to output a specified logic level in amemory array. By using a preselected threshold of 0.4 V to generatediscrete output values, the one byte of voltage values mentioned in thisparagraph would generate an output pattern of 10100111 b, where the nextto last bit is output as a 1 instead of a 0 (as previously stored) dueto a variation in the voltage output value. In some embodiments, adifferent pre-selected threshold than used to read output values duringnormal operation can be used. For example, a pre-selected threshold of0.4 V, instead of a threshold of 0.7 V normally used to determinewhether a logic 0 or 1 is stored in a 1-bit memory cell, can be used. Insome examples, multiple preselected thresholds can be used to “sweep”the test pattern by measuring voltage output values at multiplethresholds. (For example, threshold voltages t₁ and t₂ as illustrated inFIG. 2B, below). In some examples, a different threshold voltage is usedbased on the expected pattern, for example, a different threshold can beused based on whether a memory cell has been programmed with a 0 or a 1.For clarity and convenience of presentation, the examples disclosed inthe present application often describe the output of memory cells beingmeasured as an absolute voltage, however, other electrical, magnetic,and optical properties, such as current or charge, or relative ordifferential measurements based on other electrical, magnetic, andoptical properties, could also be used, as would be readily discernableto one of ordinary skill in the art.

At process block 120, the output values are compared to expected outputvalues based on the expected pattern. If discrete output values weregenerated at process block 110, then the output values are compared tonominal discrete output values based on the previously programmedexpected pattern. For example, if the output values generated at processblock 110 were 1011 b and the expected pattern was previously programmedas 1001 b, then an unexpected difference between the generated andpreviously programmed pattern is determined as a result of thecomparison. If continuous output values were generated at process block110, then the output values are compared to nominal continuous outputvalues based on the previously programmed expected pattern. For example,for an expected pattern of 1001 b, continuous output values of 3.25,0.1, 0.3, and 3.1 V could be generated. Using a nominal output thresholdvalue of 0.2 V to determine whether the output value corresponds to a 0or a 1, output values would be converted to 1011b. In some examples,multiple thresholds can be used for multi-bit cells, or to generate bitsindicating indeterminate output. For example, using 0.2 V and 3.2 V asthe logic 0 and 1 thresholds, respectively, the output values could beconverted to “10XX,” where the Xs indicate indeterminate output values(e.g., values between the thresholds of 0.2 and 3.2 V). In the previoustwo examples using continuous output values, an unexpected differencebetween the generated and previously programmed is determined as aresult of the comparison.

At process block 130, based on the comparison of the output values andthe expected output values performed at process block 120, a second setof memory cells is programmed to store data in a second set of memorycells. For example, if the comparison indicates that the output valuesvary from the expected output values by more than a pre-selectedthreshold, then the second set of memory cells is reprogrammed torefresh the data stored in the second set of memory cells. In someexamples, different voltage thresholds are used, based on the type ofdata being stored. For example, a voltage threshold closer to thenominal output voltage is used for computer-executable code stored inthe second set of memory cells, while a voltage threshold further fromthe nominal output voltage is used for less critical data that cantolerate more errors, such as audio or video data. In some examples, thedata is already stored in the second set of memory cells, and the cellsare reprogrammed in order to refresh the memory cells such that the datastored in the memory cells will be retained for a longer time period. Insome examples, the data stored in the second set of memory cells iscopied to a different memory (e.g., an SRAM coupled to a memorycontroller), the second set of memory cells is erased, and data iscopied from the different memory to the second set of cells byreprogramming the second set of cells. In other examples, the memorycells in the second set are reprogrammed in situ by adjusting the chargelevel used to program the device. Such approaches where data originatingin the second set of cell remains after reprogramming can be referred toas “in-place refresh.”

In some examples, the data to be programmed is already stored in anotherset of memory cells that is different than the second set of memorycells. For example, data stored in a third set of cells can be copieddirectly to the second set of memory cells without the need totemporarily copy the data to a different memory (e.g., an SRAM coupledto a memory controller). Such approaches where the data is moved to adifferent set of non-volatile memory cells during reprogramming can bereferred to as “out-of-place refresh.” It should be noted that the datamoved during an out-of-place refresh need not be directly addressable toconsumers of the data (e.g., entities or devices that receive the datafrom the memory array, such as applications, operating systems,filesystems, or other data consumers). For example, a non-volatilestorage device can provide a logical address to such consumers, andprovide transparent mapping of logical addresses to physical addressesin non-volatile memory using mapping tables. In other examples, anon-volatile storage device provides data as a file or stream of data.Example approaches to such mappings are discussed below regarding FIGS.5 and 6. Example implementations of the approach outlined in FIG. 1 aredescribed in further detail below regarding FIG. 7.

Example Output Values, Data Patterns, and Metadata

FIGS. 2B and 2C are charts 230 and 260 illustrating generalizedhistograms for distributions of flash memory cells having particularvoltage output levels. Typical flash memory cells store data by applyingvarying levels of electrical charge to a floating-gate transistor in amemory cell. When a flash memory cell is programmed, the thresholdvoltage of the cell varies based on the amount of charge stored in thecell. The threshold voltage of the cell can then be measured based on,for example, measuring an output voltage or current for the cell. Intypical use of an array of 1-bit flash memory cells, all or a portion ofthe cells are first erased so that all the cells being erased are set tooutput a logic 1 (e.g., a high output voltage). Next, individual bits ofa memory cell are programmed by adjusting the amount of charge stored bya floating-gate transistor of the memory cell to output a nominalvoltage. For multi-level memory cells, the charge can be adjusted toseveral different levels in order to improve the density of the memoryarray. However, such multi-level memory cells tend to decay faster, asthe margins for producing valid output values is reduced.

As shown in FIG. 2B, a number of cells in a flash memory array areprogrammed to produce a nominal voltage output level of V_(L) or V_(H)and plotted as distribution curves 240 and 250. For example, based onthe manufacturing process used, nominal voltage level V_(H) can be 3.3 V(designated a logic 1) and nominal voltage level V_(L) can be 0.0 V(designated a logic 0). Due to a number of factors, such as the durationthe data has been stored in the cell, manufacturing process variations,number of read/write cycles, temperature, power supply voltage, or otherrelevant factors, the programmed cells do not always output voltage atprecisely V_(L) or V_(H), but instead exhibit a distribution of outputvoltages. Voltage output values are plotted on the X-axis, and thenumber of memory cells having that value are plotted on the Y-axis forexample distribution curves 240 and 250. During a normal memory cellread operation, output voltage values for flash memory cells can becompared to a reference voltage V_(R), where any output voltage measuredbelow V_(R) produces a logic 0, and any output voltage measured aboveV_(R) produces a logic 1. Also shown is a distribution curve 241, whichcorresponds to a histogram for a similar voltage output levelmeasurement for the same 0-bit cells, but measured at a later point intime (for example, several months after the measurements that produceddistribution curve 240). As shown, the variation in output voltage hasincreased, and an increased number of cells exhibit output voltages thatnear threshold voltage V_(R).

By using an expected pattern of memory cell programming levels andvarying the reference voltages used, additional information regardinghow reliable programmed values are being stored in memory cells of anarray can be determined. For example, by sampling a number of outputvoltages for memory cells storing an expected pattern of output valuesat different thresholds (e.g., using an alternative set of thresholdvoltages t₁ and/or t₂), an indication of the reliability of statesstored in a flash memory can be determined. Results for a number ofcells storing a test pattern can be extrapolated to apply to non-testpattern data stored in other cells of the flash memory, and this datacan also be combined with date information regarding when the expectedpattern was programmed, performance specifications for the memory array,and/or other parameters, as described further below.

In some examples, the threshold voltages (e.g., t1 and t2) are adjustedby a user or system firmware. If a non-volatile memory array is beingused in an application specifying higher reliability (e.g., storingsource code in an embedded system) a narrower voltage threshold (t₁) isused. If the memory array is being used in an application specifyinglower reliability, a wider voltage threshold (t₂) is used. A memorycontroller can receive instructions and vary the voltage threshold(s)used accordingly. For example, values specifying thresholds t₁ and t₂ orvoltage offsets from a nominal voltage (e.g., V_(L) or V_(H)) can bestored in programmable registers on the memory storage device. In someexamples, the threshold voltage selected for evaluating the outputvoltages is determined based on the type of data stored in the memoryarray. For example, the threshold for determining when to reprogram datathat is tolerant to a number of errors, such as video or audio data, canbe evaluated using narrower voltage thresholds (e.g., voltage thresholdsthat are closer to a specified nominal voltage) than data that is lesstolerant to a number of errors, such as computer-executableinstructions.

FIG. 2C is a chart 260 that illustrates a number of distribution curves270, 271, 272, and 273 for a 2-bit flash memory cell. As shown, fourdifferent nominal voltage output levels V₀, V₁, V₂, and V₃ can be usedto indicate 00 b, 01 b, 10 b, and 11 b discrete output states,respectively. During normal read operation of a flash memory cell, threedifferent reference voltages V_(R1), V_(R2), and V_(R3) are used todistinguish between the four discrete output states. Similar to thealternative set of threshold voltages t₁ and t₂ shown in FIG. 2B, analternative set of threshold voltages t₁ and/or t₂ can be used toindicate the reliability of states stored in a flash memory using apreviously-stored expected pattern of data.

FIG. 2A is a diagram 200 depicting data stored in a portion of anon-volatile memory array in an example implementation of the disclosedtechnology as can be used with the method outlined in FIG. 1. Shown arelogic values for several 40-bit words 212-217 of data programmed in anon-volatile array 210. Each word has a physical address (e.g., addr0220) that is used for accessing the word for reading and writing. Thediagram 200 includes labeling identifying particular bits of the words.For example, the least significant bit (1sb) is labeled bit 0 and themost significant bit (msb) is labeled bit 39. Each of the six 40-bitwords 212-217 shown includes data comprising a test pattern 10 b of twobits, arbitrary data of 32 bits, and an error correcting codes (ECC)code of 6 bits, which is a Hamming code generated based on the arbitrarydata of 32 bits for each respective word. It should be appreciated thatthe test pattern 10 b is an example, and that ECC codes can be appliedto units of arbitrary data larger than 32 bits. The ECC code lengthtends to grow proportional with the size of the data the ECC code isbeing applied to and the desired quality of error correction to beprovided. Typical arbitrary data sizes include 512 bytes, 2048 bytes,and 4096 bytes of data with an additional 16 bytes, 64 bytes, and 128bytes, respectively, used for additional ECC and/or test patterninformation.

The test pattern “10” is selected such that the state of the memorycells programmed with the test pattern can be evaluated at a later date.In some examples, the test pattern includes at least one bit programmedto each possible discrete state that can be programmed for a memorycell. As shown, the test pattern is not dependent on the arbitrary databits (bits 6-37) stored in the same word as the test pattern. Thus, whenevaluating an output value for the memory cells storing a test pattern,the contents of the arbitrary data and the ECC code is not necessarilyconsidered. However, because the test pattern is predetermined andindependent of other data stored in the memory device, the expectedoutput value for the memory cells storing the test pattern are knownwithout the need to first evaluate the memory cells. In some examples,the test patterns comprise series of incremental values, addressoffsets, or alternating bit patterns (e.g., a byte of all ones followedby a byte of all zeros followed by a byte of all ones, etc.). Testpatterns can be determined by circuitry in the memory array ornon-volatile memory storage device itself, or be received from anothersource (e.g., a host computer) and programmed using a memory controllerto write the test pattern data to the memory cells.

As shown, the arbitrary data can include dates (for example, word 212encodes the date Jan. 15, 2009, at 20:31:00 GMT (as hexadecimal0x496f9d04 in the 32-bit Unix epoch)). Also shown are dates Feb. 2,2011, at 12:25:00 GMT (0x4d494d1c, encoded in word 213) and Sep. 4,2004, at 21:30 GMT (0x413a33d8, encoded in word 216). These dates can beused in some implementations, for example, to make determinationsregarding which data words are to be reprogrammed, which test patternsare to be reprogrammed, and/or other suitable determinations based onthe dates. In some examples, dates can be stored in other storageseparate from memory arrays that include test patterns. As used herein,the terms “date” and “timestamp” refers to any suitable time-based datafor tracking time and/or date. Some examples may only include a portionthe date information in the examples above, for example, only a day,month, and year (but no specific time of day data), only a month and ayear, only a time of day, or other combination of time and date fields.In other examples, the timestamp represents a number of units of timefor which a device has been operating (e.g., a number of seconds ormicroseconds).

FIG. 3A is a diagram 300 depicting data stored in a portion of anon-volatile memory array 310 in an example implementation of thedisclosed technology. As shown, two words 320 and 330 of the 32-bitwords stored in the memory include an identical test pattern. These testpatterns are included with other words of data stored in the memorydata. Thus, the test patterns need not be arranged as bits in the sameword that stores data (e.g., as shown in FIG. 2A). One aspect of usingword-length test patterns is that the test pattern can improve detectionof variations in output levels that are affected by neighboring memorycells. For example, a 0 bit adjacent to a series of several 1 bits mayexhibit faster decay in output voltage over time than a 0 bit adjacentto a number of randomly-distributed 0 and 1 bits. Thus, test patternscan be selected that are more sensitive to data integrity issues causedby process variation or other issues affecting the integrity of datastored in a memory cell.

FIG. 3B is a diagram 350 depicting data stored in a portion of amulti-bit non-volatile memory array 360 including 2-bit cells. As shown,each memory cell in the memory array can produce an output values thatcan be read as a discrete states 0, 1, 2, or 3 (or binary 00 b, 01 b, 10b, 11b). Also shown are two words 370 and 380 encoding test patternsselected for use in 2-bit cells. As the test patterns include a numberof cells programmed to each of the four available states, variation foreach logic level can be detected using the test pattern.

FIG. 4 is a diagram 400 depicting data stored in a portion of anon-volatile memory array 410 using 1-bit cells. As shown, a number ofdates (420-422) and test patterns (430 and 431) are stored in a portion440 of the memory array designated for memory overhead. Also shown are anumber of words of data (e.g., data words 450 and 451) that are storedin another portion 460 of the memory array 410 designated for memoryoverhead. Thus, test patterns, date information, and other data used todetermine the integrity of data stored in the memory array can belocated in a different portion of the memory than data. Such anarrangement can avoid complications in managing data, test patterns, anddate information.

Example Memory Organization

FIG. 5 is a diagram 500 illustrating a memory configuration storing testpatterns in an exemplary implementation of the disclosed technology. Asshown, a logical memory hierarchy 510 includes a number of blocks (e.g.,logical memory block 520), which include a number of pages (e.g.,logical memory page 530), which in turn include a number of sectors(e.g. logical sector 540). The logical memory hierarchy 510 alsoincludes a number of logical memory addresses 525, which can be used toaccess data stored in any accessible sector. While most of the dataaccessible in the logical memory hierarchy 510 is stored in sectors(e.g., sector 540 or 545), in some examples, system data can also bestored in memory designated as belonging to a page (e.g., page 530) orblock (e.g., block 520). Two logical sectors 545 and 546 are highlightedto indicate that these sectors are storing test pattern data (e.g., anexpected pattern of 0 and 1 bits) to be used for determining dataintegrity. In some examples, sectors storing test pattern data caninclude other data, while in other examples, an entire sector isdedicated to storing test pattern data.

Data can be accessed according to the logical memory hierarchy 510without the data consumer having an indication where in the memorydevice the data is actually physically stored. In those embodiments, thelogical memory hierarchy 510 acts as an abstraction layer for accessingthe non-volatile memory hierarchy (e.g., a memory controller or otherprocessor implementing a file system, operating system, application, orother suitable process) without needing to map memory to physicallocations within a memory array.

The memory hierarchy diagram 500 also includes a logical/physicalmapping table 550 and a physical memory hierarchy 560. The physicalmemory hierarchy 560 is a representation of how data is arrangedaccording to the physical implementation of a memory array. Alogical/physical mapping table 550 provides mapping to the physicalmemory by looking up mappings of individual sectors and providing dataaccording to the mapping. For example, test pattern data stored at block1, page 0, sector 1 (sector 546) of the logical memory hierarchy 510 isactually stored at block 0, page 0, sector 1 (sector 570) of thephysical memory hierarchy 560.

As shown, those sectors 570-572 storing test pattern data arehighlighted, and cells in those sectors can be designated as patterncells. In this example, the sectors 570-572 for storing test pattern areselected such that each block of the physical memory hierarchy 560 hasat least one sector with test pattern data. Thus, blocks can be arrangedaccording to specific hardware implementing a non-volatile memory array(e.g., each block corresponds to a single one of multiple flash memorychips). Memory cells storing data in other sectors (e.g., sectors 580and 581) do not store test pattern data, and can be designated as datacells. In this way, the accuracy of data lifecycle estimate can beimproved by associating data lifecycles with a test pattern stored inthe same block (e.g., the same chip or portion thereof), based on theassumption that variations due to manufacturing process, temperature,supply voltage, or other variations, are more likely to be similarwithin a particular block.

As used herein, a “page” of memory refers to the smallest amount ofmemory that is independently programmable in a memory hierarchy. A“sector” of memory refers to the smallest amount of memory that can beread using a single sector read operation. A “block” refers to acollection of a number of pages. As will be readily understood by one ofordinary skill in the art, selection of the size and arrangements ofsectors, pages, and blocks can be made depending on the underlyingmemory storage technology, design tradeoffs in performance, power, andproduct cost between reading, addressing, and programming memory, andother considerations. Thus, the memory hierarchies depicted in FIGS. 5and 6 are provided for illustrative purposes and are not intended tolimit the scope of the present disclosure in any way.

FIG. 6 is a diagram 600 illustrating a memory configuration storing testpatterns in an exemplary implementation of the disclosed technology,including a logical memory hierarchy 610, a logical/physical mappingtable 650, and a physical memory hierarchy 660, which are implemented ina similar fashion to those described above regarding diagram 500 of FIG.5.

The diagram 600 of FIG. 6 illustrates an alternative technique forarranging the location of physical sectors storing test pattern data(e.g., physical sectors 670-672) in a memory storage device. As shown,each of the highlighted physical sectors is located in an identicallyaddressed respective sector relative to each respective page of thephysical memory. Such an arrangement can simplify identification and useof the test pattern data in certain implementations of the disclosedtechnology. Similar to the approach described regarding FIG. 5, thephysical sectors storing test pattern data and non-test pattern data canbe accessed using logical memory addresses and a logical/physicalmapping table 650.

The types of suitable test patterns are not limited to the examplesdepicted in FIGS. 2A, 3A, and 3B. In some examples, all or a portion ofa memory sector in a memory array can be used as a test pattern, whileother memory sectors do not contain any test patterns. In some examples,the test patterns are stored in areas of the memory array designated formaintenance or other overhead bits. Further, test patterns can also beprogrammed that span multiple words of a sector.

Example Further Detailing Generation of Output Values

FIG. 7 is a flow chart 700 of another, more detailed exemplary method ofgenerating output values from a first set of memory cells based on apreviously-stored expected pattern and programming a second set ofmemory cells based on a comparison of the output values and the expectedpattern.

At process block 710, an expected pattern of discrete states is storedin one or more pages of physical memory cells of a non-volatile memoryarray. For example, test patterns similar to those depicted in FIGS. 2A,3A, 3B, and/or 4 can be stored in a non-volatile memory array, asdiscussed above. Furthermore, techniques for selecting where an expectedpattern is stored in the non-volatile memory can include those discussedabove regarding FIGS. 5 and 6. In some examples, the non-volatile memoryarray is programmed with an expected pattern of discrete states by thenon-volatile storage device manufacturer before the device is sold,while in other examples, the expected pattern is programmed at someother point during the lifetime of the device (e.g., by a memorycontroller executing maintenance routines).

In some examples, additional data, such as metadata representing dateinformation or error correcting codes (ECC) can also be stored in thenon-volatile memory array at process block 710. For example, dateinformation indicating when an expected pattern was stored in the memoryarray can be stored as metadata. In some examples, metadata associatedwith other data stored in a non-volatile storage device can be stored.In some examples, the storage device includes defined memory locationsfor storing metadata.

At process block 720, a first electrical property (e.g., an outputvoltage, an output current, resistance, charge, or other suitableproperty) is measured for one or more non-volatile memory cells of afirst set of memory cells. For example, an output voltage for a memorycell in a first set can be measured at a first point in time using afirst set of parameters applied to the memory cells (e.g., supplyvoltage for the memory array, reference voltage used to determine logiclevels, or other suitable parameters). In some examples, a senseamplifier is used to generate voltage output values that are used togenerate discrete output values. In some examples, the cells belong tothe first set because those cells store the expected pattern. In otherexamples, date information indicating when the cells were programmed canbe used to select cells that belong to the first set (e.g., by selectingonly the oldest cells storing the expected pattern).

At process block 725, a second electrical property (e.g., an outputvoltage, an output current, resistance, charge, or other suitableproperty) is measured for one or more non-volatile memory cells of thefirst set of memory cells. For example, an output voltage for a memorycell in a first set can be measured at a second point in time using thesame first set of parameters used at process block 720. Hence, the sameelectrical property (e.g., output voltage) can be measured at two pointsin time and later compared to determine the rate at which reading datastored in the first set of memory cells is becoming less reliable.

In some examples, data representing one or both of the two electricalproperties measured at process blocks 720 and 725 can be stored in acomputer-readable storage medium to facilitate comparing the properties.In some examples, the first electrical property can be measured and datarepresenting the property stored by the manufacturer of a non-volatilememory storage device, and the second electrical property can bemeasured at a later date (e.g., on the order of months or years later).

In some examples, a second, different set of one or more parameters canbe applied to the memory cells (e.g., supply voltage for the memoryarray, reference voltage used to determine logic levels, or othersuitable parameters). For example, two different reference voltages orpower supply voltages can be used to determine voltage output levelsduring a relatively short period of time (e.g., on the order of seconds,minutes, or hours) to improve measurements of the stability of datastored in the first set of cells. For example, using two differentthreshold voltages t₁ and t₂, as shown in FIG. 2B, is an example of twodifferent reference voltages that could be used. In some examples, thetwo electrical properties can be compared in a linear fashion, while inother examples, the properties are compared using a logarithmic scale,or a nonlinear scale. In some examples, two different types ofparameters (e.g., supply voltage and reference voltage) and/or twodifferent electrical properties (e.g., output voltage and current) arevaried for the measurements at process blocks 720 and 725. In someexamples, only a single electrical property is measured, and the act ofmeasuring depicted at process block 725 is not performed.

At process block 730, one or more output values are generated for thefirst set of memory cells based on an expected pattern that was storedin the first set of memory cells at process block 710. For example, asimple pass-fail indication, indication of zero or more failing bits ofthe expected pattern, or a pattern of discrete states (based on themeasurements made at process blocks 720 and/or 725) can be generated asthe output values. The expected pattern used to base the output valuescan be received from, for example, data stored in a non-volatile storagedevice, received from a host computer system coupled to a non-volatilestorage device, or stored as a number of computer-executableinstructions for execution by a memory controller that generates theoutput values. Hence, the expected pattern does not need to be based ondata stored in the first set of memory cells, but can be predeterminedindependently of data stored in the first set of memory cells. In someexamples, the output values are discrete states (e.g., logic 1 or 0)while in other examples, the output values are continuous values (e.g.,expressed in Volts, Amperes, or Coulombs).

At process block 740 additional metadata (e.g., date information or ECCdata) is produced and can be used to compare the output values atprocess block 750. For example, data information indicating the currentdate, date that the expected pattern was stored, and/or the date thatthe measurements at process block 720 and/or 725 were made, can be used.In some examples, the date information is stored in one or more memorycells of a non-volatile memory array included in a non-volatile storagedevice (e.g., the memory array including the first set of cells, oranother memory array). In some examples, date information can beproduced by receiving date information from a host computer coupled to anon-volatile storage device. In some examples, date information isproduced using a real-time clock coupled to the non-volatile storagedevice. In some examples the real-time clock is a part of the memorycontroller, or is included in the same housing as other components ofthe non-volatile storage device. In other examples, elapsed timeinformation is produced using a monotonic clock that increments timeinformation periodically while the non-volatile storage device isoperational and which is coupled to the non-volatile storage device. Forhigh-reliability, “always on” applications, a time duration forreprogramming flash memory can be computed from an accumulated timegenerated using a monotonic clock. Thus, memory blocks can be traversedand selected for reprogramming based on exceeding a threshold, such as apredefined data persistence time or voltage output level. Metadata(e.g., date information, ECC codes, and information describing the typeor format of the underlying information stored (e.g., audio, video, orother types of data) can be stored on a per-block or per-page basis, orperformed for an entire memory array or partition.

The use of date information can be used to further improve the accuracyof reliability estimates based on the measured electrical properties. Atprocess block 750, first and second output values measured at processblock 720 and 725, output values generated at process block 730, anddate information produced at process block 740, are compared to producea result determining whether all or a portion of memory cells in anon-volatile storage device should be reprogrammed. In some examples,the determination is made as a simple reprogram/do not reprogramindication for an entire memory array or an entire storage device(including multiple memory arrays). In further examples, thedetermination can be made for a range of physical memory addresses(e.g., all memory cells in a page or block of memory), logical memoryaddresses, or for a number of memory locations based on a dateassociated with a memory locations (e.g., all memory pages that wereprogrammed more than 2 years ago, or all memory blocks programmed within6 months of when the expected pattern was stored in non-volatile memorystorage).

At process block 760, if an indication to reprogram memory cells isdetermined, then the method proceeds to process block 770. If adetermination that no reprogramming is needed is made, then the methodcan proceed to process block 720 to make additional measurements.

At process block 770, a determination is made whether to reprogrammemory cells of the non-volatile storage device using an “in-place” or“out-of-place” technique. This determination can be made using, forexample, a memory controller of a non-volatile storage device or by ahost computer coupled to a non-volatile storage device. It should benoted that the memory cells to be reprogrammed do not necessarilyinclude the memory cells storing the expected pattern that was stored atprocess block 710. In some examples, the memory cells to be reprogrammedis stored in the same sector, page, or block of memory as the expectedpattern, while in other examples, the cells to reprogrammed are storedin different sectors, pages, or blocks.

If the in-place technique is selected, the method proceeds to processblock 780, and data from memory cells to be reprogrammed is copied toanother location (e.g., by storing the data in an SRAM coupled to anon-volatile storage device, a DRAM coupled to a host computer coupledto the non-volatile storage device, or in other memory cells innon-volatile memory of the non-volatile storage device).

At process block 785, at least a portion of the data copied at processblock 780 is reprogrammed to the original non-volatile memory cells tobe reprogrammed. In some examples, a page or block of non-volatilememory is reprogrammed. In other examples, only specific cells arereprogrammed. In some examples, all cells of a page or block beingreprogrammed are erased to a specified logic value (e.g., a logic 1) andthen specific bits are programmed to a different logic level (e.g., alogic 0). In some examples, cells can be reprogrammed without beingerased by adjusting the amount of charge stored in the cells to reflecta nominal amount of charge for the desired programmed state. In someexamples, date information associated with the data to be reprogrammedis also stored (e.g., in designated date locations in non-volatilestorage, which can be user and/or host system accessible, or indesignated maintenance areas, which can have access limited to thememory controller, but not to a user and/or host system coupled to thenon-volatile storage device).

After the copied contents have been programmed at process block 785, themethod can then proceed to process block 710 in order to reprogram anexpected pattern and/or metadata (such as date information) in one morepages of physical memory cells in a non-volatile storage device (in someexamples, program date information associated with the expected patternis also stored). In other examples, the expected pattern is notreprogrammed, and the method proceeds to process block 720, wheremeasurements are made using a previously-programmed expected pattern.

If instead an out-of-place technique is selected at process block 770,the method proceeds to process block 790, during which data from thecells to be reprogrammed are copied to a different, second set of memorycells of a non-volatile storage device. Hence, the data contents do notneed to be copied to a temporary location (e.g., an SRAM coupled to amemory controller) as with the in-place techniques outlined regardingprocess blocks 780 and 785. In some examples, the logical addresses usedto access the refreshed data can be identical to those used beforereprogramming, by updating a lookup table used to map logical addressesto the physical addresses where the reprogrammed data is stored. In someexamples, date information associated with the newly-programmed cells isalso stored. After the second set of cells is reprogrammed, the methodcan proceed to process block 710 to program an expected states pattern,or proceed to process block 720 to measure electrical properties withoutreprogramming an expected states pattern, in a similar fashion to thatdiscussed above regarding process block 785.

Example of Servicing Memory Device

FIG. 8 is a flow chart 800 that outlines an exemplary method ofservicing a memory device, including communicating with a host device toindicate a need to service the device before servicing as outlined inFIG. 1. For example, a non-volatile storage device includingnon-volatile memory and a memory control can send and receive signalswith a host computer coupled to the non-volatile storage device using ahardware interface. An example configuration for use in performing themethod outlined in FIG. 8 is described below regarding FIG. 10.

At process block 810, a determination is made as to whether to service amemory device in a non-volatile storage device by evaluating a datapattern and one or more output values of cells of non-volatile memorythat have been programmed with the data pattern. Suitable techniques fordetermining whether one or more memory cells of a memory device shouldbe serviced are described above regarding FIGS. 1 and 7. For example,the determination can be based on comparing an output voltage for one ormore memory cells to a reference voltage and predetermined data pattern.In some examples, additional information such as date informationassociated with the data pattern, date information associated with datastored in non-volatile memory, time elapsed since last programming,operating conditions or parameters, system- or user-defined parameters,or other suitable information can be used in the determination. In someimplementations, the determination is made at predefined times, forexample, upon reboot of a host system, mounting/dismounting a filesystemstored on a non-volatile storage device, at a periodic time, or othersuitable times. In some examples, a signal from a host system coupled toa non-storage device is sent to the storage device indicating thedetermination to service the storage device based on a user request,system request, or other suitable event. If a determination to servicethe non-volatile memory is made, the method proceeds to process block820.

At process block 820, a signal is sent to a host system coupled to thenon-volatile storage device indicating that one or more portions ofnon-volatile memory are to be serviced. For example, a hardwareinterrupt (e.g., a Universal Serial Bus (USB) interrupt) can betransmitted to the host system using a hardware interface (e.g., a USBinterface). Thus, by providing an indication to the host system, thehost can receive the signal and prepare for the non-volatile storagedevice to be serviced by, for example, closing open filehandles,suspending computing processes, or performing other suitable functions.In some examples, additional information such as logical or physicaladdresses of the memory to be serviced, filenames, or other informationcan be included with the signal so that the host can initiate servicingfunctions based on the additional information. For example, only certainpages, blocks, or files stored in non-volatile memory may need to beinaccessible during servicing. The storage device can use othertechniques to send a signal to a host controller indicating the need toinitiate servicing functions on the memory, for example, by reading ahardware register value that a host controller periodically scans, or byreading a predefined bit pattern from a memory test pattern area, shownin FIG. 2A.

At process block 830, a signal is received indicating that thenon-volatile memory can be safely serviced. For example, a host systemcoupled to the non-volatile storage device can send a signal to acoupled non-volatile storage device indicating that appropriate actionshave occurred that would allow the storage device to be safely takenoffline by placing the device in a safe state. Further, by sending sucha signal, the host system indicates that additional read and/or writerequests will be suspending for a period of time (e.g., until receivinga signal from the storage device that servicing is complete). Afterreceiving the signal, the method proceeds to process block 840 to beingservicing the memory storage device, by, for example initiating serviceusing a memory controller.

At process block 840, all or a portion of memory devices in anon-volatile storage device are serviced to restore programming of oneor more cells of the memory device. For example, the storage device canbe placed in a safe mode, and all or a portion of a memory page can beerased and reprogrammed to refresh data stored in memory device (e.g.,using in-place or out-of-place refresh, as described above). When in thesafe mode, operations that change data, metadata, and/or systeminformation can be prevented from executing to prevent interference withdevice reprogramming.

Example Further Detailing Servicing of a Memory Device

FIG. 9 is a flow chart 900 of another, more detailed exemplary method ofservicing a non-volatile memory device coupled with a host device asoutlined in FIG. 8. As described further below, the servicing comprisesrestoring programming for memory cells storing data in a first unit ofmemory cells. The unit can be a sector, page, block, or other suitableportion of memory in a non-volatile memory device. The servicing furthercomprises storing a data pattern in a second unit of memory cells. Bycomparing output voltages for the data pattern memory cells to nominaloutput values based on the data pattern, a determination can be madewhether to restore programming for the first unit of memory cellsstoring the data

At process block 910, a data pattern is stored in one or more cells of asecond unit of memory in a non-volatile storage device. For example, aunit of memory can be a sector, page, block, or other suitable unit ofmemory for storage of the data pattern. Exemplary descriptions ofsuitable data patterns are described above regarding FIGS. 2A, 3A, 3B,and 4-6, and detailed examples of methods comprising generating andstoring a data pattern are described above regarding FIGS. 1 and 7-8.

At process block 920, the data pattern and output values of the secondunit of memory are evaluated. For example, voltage output levels can becompared to the data pattern to determine if the data pattern and theoutput of the memory unit storing the data pattern are identical.

At process block 930, date information is received from a host computingsystem coupled to the non-volatile storage device. For example, the hostcomputing system can transmit date and time information based on a clockof the host system. In some examples, the date information can bereceived from a real-time clock of the memory storage device, inaddition to, or in lieu of receiving date information from the hostsystem. In other examples, elapsed time information can be received froma monotonic clock on the memory storage device, in addition to, or inlieu of, receiving date information from the host system.

At process block 940, a determination is made whether to service thenon-volatile memory storage device (e.g., by reprogramming cells in oneor more memory arrays of the device) based on the data pattern, outputvalues, and date information. For example, if an output voltage level ofa cell storing a portion of the data pattern is calculated to be nearingan unreliable storage state, a determination to reprogram all or aportion of the memory arrays is made. In some examples, data associatedwith the data pattern, or the data pattern itself, are determined to bein need of servicing.

At process block 950, the method checks the determination made atprocess block 940, and if the device is not determined to needservicing, proceeds to process block 920. If one or more memory arraysof the device are determined to need servicing, the method proceeds toprocess block 960.

At process block 960, an indication is provided that the memory storagedevice is to be serviced. In some examples, the indication is providedby sending a signal to the host system (e.g., by transmitting a datavalue to the host system). In some examples, an interrupt mechanism of ahardware interface can be used to send such a signal to the host system.In some examples, the indication is provided by storing a value in adesignated memory location, which can be polled by a host system coupledto the memory storage device. By providing an indication to the hostsystem, the host can receive the signal and prepare for the non-volatilestorage device to be serviced without interfering with the normaloperation of the host system. In some examples, additional informationcan be included in the signal so that the host can initiate servicingfunctions based on the additional information. For example, only certainpages, blocks, or files stored in non-volatile memory may need to beinaccessible during servicing. In some examples, the device may set ahardware state value which a host computing system scans periodically orupon boot to determine that storage maintenance needs to be performed.

At process block 970, a signal is received indicating that thenon-volatile memory can be safely serviced. For example, the hostcomputing system can send a signal to the non-volatile storage deviceindicating that the storage device to be safely taken offline. Further,by sending such a signal, the host system indicates that additional readand/or write requests will be suspending for a period of time.

At process block 980, all or a portion of memory devices in anon-volatile storage device are serviced to restore programming of afirst unit of one or more cells of the memory device. For example, thestorage device can be placed in a safe mode (e.g., an inaccessiblestate, where operations such as memory writes or memory reads, whichwould interfere with programming the memory cells, are prevented fromoccurring with, for example, a memory controller), and all or a portionof a memory page storing data can be erased and reprogrammed to refreshdata stored in memory device (e.g., using in-place or out-of-placerefresh, as described above). When in the safe mode, operations thatchange data, metadata, and/or system information can be prevented fromexecuting to prevent interference with device reprogramming. In someexamples, the first unit of memory includes the second unit of memory(storing the data pattern), while in other examples, the first unit ofmemory and the second unit of memory occupy different locations innon-volatile memory of the storage device.

In some examples, portions of the methods outlined in the flow charts100, 700, 800, and/or 900 can be performed using a combination of one ormore of the following components: a flash programming tool (e.g., usedby the manufacturer of a non-volatile storage device), a memorycontroller (e.g., in a non-volatile storage device including amicrocontroller), or a host system (e.g., using a hardware driver orother computer-executable instructions executable on a server, apersonal computer, and embedded system, or smart phone coupled to thenon-volatile storage device).

FIG. 10 is a block diagram 1000 illustrating a non-volatile storagedevice 1010 coupled to a host computing system 1090 as can be used inexamples of the methods disclosed herein (e.g., the methods depicted inFIGS. 1, 7, 8, and 9). The non-volatile storage device 1010 includes amemory controller 1020, non-volatile memory array 1030, SRAM (StaticRandom Access Memory) 1040, and hardware interface 1050. The hostcomputing system 1090 can be any suitable computing device that can becoupled to the non-volatile storage device 1010, for example, a host PC,mobile device, smart phone, or other suitable device. Differentconfigurations of the non-volatile storage device 1010 can be configuredfor use in removable USB storage devices, solid-state drives (e.g.,solid-state drives in the housing of the host computing system 1090),embedded systems, or other suitable configurations.

As shown, the memory controller 1020 is coupled to the non-volatilememory array 1030, SRAM 1040, and hardware interface 1050. In otherexamples register files, DRAM, or other suitable memory technology canbe used to perform the functions of SRAM 1040. The memory controller1020 can be implemented as, for example, a general-purposemicroprocessor, a microcontroller, or digital logic and other circuitryfor performing the techniques disclosed herein. Selection of appropriatehardware and software for implementing the memory controller can bebased on memory storage, memory bandwidth, reliability, power, or otherspecifications. As shown, the memory controller includes a programmingcircuit 1022 coupled to the non-volatile memory array 1030 for erasing,programming, and re-programming memory cells in the non-volatile memoryarray. In some examples, the programming circuitry includes appropriatepower supplies for generating appropriate programming voltages andcircuitry for addressing the selected portions of the non-volatilememory array to be programmed.

The memory controller 1020 also includes a memory interface 1024 forreading data stored in the non-volatile memory array and reading andwriting data stored in the SRAM. In some examples, the memory interface1024 includes one or more of sense amplifiers, comparators,analog-to-digital (ADC), digital-to-analog (DAC), or other circuitry forgenerating output values from memory cells in the memory array 1030. Insome examples, the memory interface 1024 produces discrete logic valuesfor use by the memory controller 1020, while in other examples, thememory interface 1024 can produce continuous values (e.g., voltageoutput levels, expresses as an analog signal or a digital representationof the voltage output level) for use by the memory controller.

Another component of the memory controller 1020 is a processing unit1026, which can be a general-purpose processor, microcontroller, orother suitable processor or logic for controlling operation of theprogramming circuit 1022 and memory interface 1024. The processing unit1026 is also coupled to a hardware interface 1050 for sending andreceiving instructions and data to and from the host computing system1090. The memory controller 1020 also includes a real-time clock 1028for producing date information used in evaluating output values and forstoring date information in the non-volatile memory array 1030 and/orSRAM 1040. In some examples, the real-time clock 1028 can be powered(e.g., using a battery) when the non-volatile storage device is offlineor unpowered in order to maintain accurate time and date information. Inother examples, the real-time clock 1028 is initialized when the storagedevice 1010 is powered on using, for example, date information receivedfrom the host system 1090. In other examples, the real-time clock 1028is a monotonic clock that increments a time variable periodically whenthe device 1010 is powered on. For high-reliability systems, trackingelapsed time using a monotonic clock is nearly equivalent to the actualelapsed time for a system in continuous service. In other examples, thereal-time clock 1028 is a monotonic clock that is initialized when thedevice 1010 is powered on using information received from the hostsystem 1090.

The hardware interface 1050 is operable to send instructions and databetween the storage device 1010 and host computer system 1090. Examplesof suitable hardware interfaces include implementations of USB, CFI(Common Flash memory Interface), Parallel ATA, SATA (Serial ATA), SCSI,eSATA, Ethernet, IEEE 1394, or other suitable hardware interfacestandards. The hardware interface need not require a mechanicalelectrical connection. For instance, the hardware interface can beimplemented using a suitable wireless standard, such as IEEE 802.11 b,802.11g, 802.11n, or a Bluetooth interface.

FIG. 11 illustrates a generalized example of a suitable computingenvironment 1100 in which described embodiments, techniques, andtechnologies may be implemented. For example, the computing environment1100 can implement at least some aspects of a host computer systemand/or a non-volatile storage device, as described above.

The computing environment 1100 is not intended to suggest any limitationas to scope of use or functionality of the technology, as the technologymay be implemented in diverse general-purpose or special-purposecomputing environments. The disclosed technology may also be practicedin distributed computing environments where tasks are performed byremote processing devices that are linked through a communicationsnetwork. In a distributed computing environment, program modules orinstructions may be located in both local and remote memory storagedevices.

With reference to FIG. 11, the computing environment 1100 includes atleast one central processing unit 1110 and memory 1120. In FIG. 11, thismost basic configuration 1130 is included within a dashed line. Thecentral processing unit 1110 executes computer-executable instructions.In a multi-processing system, multiple processing units executecomputer-executable instructions to increase processing power and assuch, multiple processors can be running simultaneously. The memory 1120may be non-transitory volatile memory (e.g., registers, cache, RAM),non-transitory non-volatile memory (e.g., ROM, EEPROM, flash memory,etc.), or some combination of the two. The memory 1120 stores software1180 that can, for example, implement the software embodiments describedherein. A computing environment may have additional features. Forexample, the computing environment 1100 includes storage 1140, one ormore input devices 1150, one or more output devices 1160, one or morecommunication connections 1170, and one or more non-volatile storagedevice interfaces 1190. An interconnection mechanism (not shown) such asa bus, a controller, or a network, interconnects the components of thecomputing environment 1100. Typically, operating system software (notshown) provides an operating environment for other software executing inthe computing environment 1100, and coordinates activities of thecomponents of the computing environment 1100.

The storage 1140 may be removable or non-removable, and includesmagnetic disks, magnetic tapes or cassettes, CD-ROMs, CD-RWs, DVDs, orany other non-transitory storage medium which can be used to storeinformation and that can be accessed within the computing environment1100. The storage 1140 stores instructions for the software 1180, whichcan implement technologies described herein.

The input device(s) 1150 may be a touch input device, such as a touchscreen, keyboard, keypad, mouse, pen, or trackball, a voice inputdevice, a scanning device, or another device, that provides input to thecomputing environment 1100. For audio, the input device(s) 1150 may be asound card or similar device that accepts audio input in analog ordigital form. The output device(s) 1160 may be a display, touch screen,printer, speaker, CD- or DVD-writer, or another device that providesoutput from the computing environment 1100.

The communication connection(s) 1170 enable communication over acommunication medium (e.g., a connecting network) to another computingentity. The communication medium conveys information such ascomputer-executable instructions, compressed graphics information, orother data in a modulated data signal.

Computer-readable media are any available media that can be accessedwithin a computing environment 1100. By way of example, and notlimitation, with the computing environment 1100, computer-readable mediainclude memory 1120 and/or storage 1140. As should be readilyunderstood, the term computer-readable storage media includesnon-transitory storage media for data storage such as memory 1120 andstorage 1140, and not transmission media such as modulated data signals.

The disclosed methods, apparatus, and systems should not be construed aslimiting in any way. Instead, the present disclosure is directed towardall novel and nonobvious features and aspects of the various disclosedembodiments, alone and in various combinations and subcombinations withone another. The disclosed methods, apparatus, and systems are notlimited to any specific aspect or feature or combination thereof, nor dothe disclosed embodiments require that any one or more specificadvantages be present or problems be solved. The techniques andsolutions described in this application can be used in variouscombinations to provide an improved migration system.

Any of the methods described herein can be performed via one or morecomputer-readable media (e.g., storage or other tangible media)comprising (e.g., having or storing) computer-executable instructionsfor performing (e.g., causing a computing device to perform) suchmethods. Operation can be fully automatic, semi-automatic, or involvemanual intervention.

Having described and illustrated the principles of our innovations inthe detailed description and accompanying drawings, it will berecognized that the various embodiments can be modified in arrangementand detail without departing from such principles. It should beunderstood that the programs, processes, or methods described herein arenot related or limited to any particular type of computing environment,unless indicated otherwise. Various types of general purpose orspecialized computing environments may be used with or performoperations in accordance with the teachings described herein. Elementsof embodiments shown in software may be implemented in hardware and viceversa.

In view of the many possible embodiments to which the principles of thedisclosed invention may be applied, it should be recognized that theillustrated embodiments are only preferred examples of the invention andshould not be taken as limiting the scope of the invention. Rather, thescope of the invention is defined by the following claims. We thereforeclaim as our invention all that comes within the scope of these claimsand their equivalents.

I claim:
 1. A method of managing memory cells storing data in anon-volatile memory device, the method comprising: generating one ormore output values from a first set of memory cells of the non-volatilememory device, the one or more output values being based on one or morevalues previously stored in the first set of memory cells, the one ormore output values being generated using threshold voltages that aredifferent than a threshold voltage used during normal operation of thefirst set of memory cells; receiving first date information stored inthe non-volatile memory device indicating when the first set of memorycells was programmed and second date information stored in thenon-volatile memory device indicating when a second set of memory cellswas programmed, data in the second set of memory cells being independentof the first set of memory cells; comparing the output values from thefirst set of memory cells of the non-volatile memory device to one ormore first expected output values; and based at least in part on thefirst date information, the second date information, and on thecomparing of the output values from the first set of memory cells of thenon-volatile memory device to the one or more first expected outputvalues and without separately comparing output values from the secondset of memory cells of the non-volatile memory device to second expectedoutput values, programming the second set of one or more memory cells ofthe non-volatile memory device to refresh the data in the second set ofmemory cells.
 2. The method of claim 1, wherein the first expectedoutput values are based on an error-correcting code (ECC) for the datain the second set of memory cells.
 3. The method of claim 1, wherein thegenerating comprises measuring an electrical property of at least onecell of the first set of cells.
 4. The method of claim 1, wherein thefirst expected output values are nominal output values expected to begenerated by cells of the non-volatile memory device when programmedwith an expected pattern.
 5. The method of claim 1, wherein: thenon-volatile memory device includes one or more pages of physicalmemory, the pages of physical memory being the smallest unit of thenon-volatile memory device that can be erased; the pages of physicalmemory comprise two or more sectors of physical memory; and each cell ofthe first set of cells is located in identically-addressed respectivesectors relative to each respective page of physical memory included inthe non-volatile memory device.
 6. The method of claim 1, furthercomprising generating one or more second output values from the firstset of memory cells, the second output values being based on thepreviously-stored values, wherein: the output values are first outputvalues; and the comparing comprises comparing the first output values,the second output values, the first date information, the second dateinformation, and the expected output values using a pre-selectedthreshold.
 7. The method of claim 1, wherein the different thresholdvoltages are based on a tolerance value for an electrical property ofthe non-volatile memory device.
 8. One or more computer-readable storagedevices storing computer-readable instructions that when executed by aprocessor, cause the processor to perform a method, the instructionscomprising: instructions executable to generate one or more outputvalues from a first set of memory cells of a non-volatile flash memorydevice, the output values being based on one or more values previouslystored in the first set of memory cells, the one or more output valuesbeing generated using threshold voltages that are different than athreshold voltage used during normal operation of the first set ofmemory cells; instructions executable to compare the output values fromthe first set of memory cells of the non-volatile flash memory device toone or more first expected output values; and instructions executableto, based at least in part on the comparing of the output values fromthe first set of memory cells of the non-volatile flash memory device tothe one or more first expected output values and without comparingoutput values from a second set of memory cells of the non-volatilememory flash device to second expected output values, program the secondset of one or more memory cells of the non-volatile flash memory deviceto refresh data in the second set of memory cells, the second set ofmemory cells to be programmed being determined based on the first set ofmemory cells, the data in the second set of memory cells beingindependent of the data in the first set of memory cells, the first setof memory cells and the second set of memory cells being stored in thesame word of the non-volatile flash memory device.
 9. A method ofservicing a memory device coupled to a computing system, the memorydevice including two or more sectors of memory, each of the sectorscomprising one or more memory cells, the method comprising: determiningwhether to service a first set of memory cells of the memory device byevaluating a data pattern and one or more output values generated byreading one or more memory cells of a second set of memory cells of thememory device, the second set of memory cells of the second sector beingpreviously programmed to store the data pattern; based on thedetermining, sending a first signal to the computing system indicatingthat the memory device is to be serviced; receiving a second signal fromthe computing system indicating that the memory device can be safelyserviced; and based on the determining and the receiving, servicing thememory device by restoring programming of one or more memory cells ofthe first set of memory cells, the first set of memory cells beingdetermined based on the data pattern and the output values of the secondset of memory cells, data in the first set of memory cells beingindependent of the data in the second set of memory cells the first setof memory cells and the second set of memory cells being stored in asame word of the memory device.
 10. The method of claim 9, furthercomprising receiving system date information from the computing system,wherein the determining comprises comparing the system date informationto date information associated with the second set of memory cells. 11.The method of claim 9, wherein one or more of the output values arebased on a voltage level output by at least one of the memory cells ofthe second sector.
 12. The method of claim 9, wherein the determiningcomprises: determining a first timestamp indicating when the datapattern was stored in the second sector; determining a second timestampindicating when data was stored in the first sector; and determiningthat at least one of the sector is to be serviced by comparing the firsttimestamp and the second timestamp.
 13. The method of claim 9, furthercomprising: receiving data to be stored in the memory device from thecomputing system; receiving a first timestamp from the computing system;and storing the received data in the first sector, the data pattern inthe second sector, and the first timestamp in one or more of the memorycells.
 14. The method of claim 13, wherein a logical address for storingthe received data in the first sector and a logical address for storingthe data pattern in the second sector are not determined by thecomputing system.
 15. A storage device comprising a memory array, amemory controller, and a hardware interface, wherein: the memory arraycomprises one or more non-volatile memory cells; the hardware interfaceis operable to receive data to be stored in the non-volatile memorycells from a computer system coupled to the hardware interface; and thememory controller is configured to maintain the received data whenstored in the non-volatile memory cells using a method comprising:receiving date information representing a date associated with thereceived data, storing the received data in at least one of thenon-volatile memory cells, designated as data cells, storing at least aportion of the date information in the memory array, storing a datapattern in at least one of the non-volatile memory cells, designated aspattern cells, the data pattern being independent of the received data,measuring an output value from at least one of the designated patterncells, the measuring being performed using a different threshold voltagethan a threshold voltage used for the data pattern of the non-volatilememory cells, comparing the output value to an expected output valuebased on the data pattern, the comparing including evaluating avariation between the output value and a nominal output value andevaluating the date information stored in the memory array, and if thecomparing indicates that a pre-selected threshold is exceeded andwithout separately comparing output values from the data cells to anyexpected output values, then: providing a first indication that thestorage device will be in an inaccessible state via the hardwareinterface; refreshing the received data in the data cells by repeatingthe storing of the received data; and after the repeating the storing,providing a second indication that the storage device is not in theinaccessible state.
 16. The storage device of claim 15, wherein themethod further comprises: receiving a signal from a computing systemcoupled to the hardware interface indicating that the memory controllercan proceed with the repeating of the storing the received data, whereinthe computing system generates the signal responsive to the providedindication, and wherein the repeating the storing of the received datais based on the signal.
 17. The computer-readable storage devices ofclaim 8, wherein the expected first output values are nominal outputvalues expected to be generated by cells of the non-volatile memorydevice when programmed with an expected pattern.
 18. Thecomputer-readable storage devices of claim 8, wherein: the non-volatilememory device includes one or more pages of physical memory, the pagesof physical memory being the smallest unit of the non-volatile memorydevice that can be erased; the pages of physical memory comprise two ormore sectors of physical memory; and each cell of the first set of cellsis located in identically-addressed respective sectors relative to eachrespective page of physical memory included in the non-volatile memorydevice.
 19. The storage device of claim 15, wherein the method furthercomprises, if the comparing indicates that the pre-selected threshold isnot exceeded, then not repeating the storing of the received data. 20.The method of claim 1, wherein refreshing the data in the second set ofmemory comprises: copying existing data in the second set of memorycells to another location in memory; erasing the existing data in thesecond set of memory cells; and reprogramming the second set of memorycells with the copied data, wherein the data is reprogrammed topredetermined voltages.
 21. The method of claim 1, wherein refreshingthe data in the second set of memory cells comprises: adjusting anamount of charge stored in the second set of memory cells to reflect anominal amount of charge for a desired programmed state.
 22. The methodof claim 1, wherein the different threshold voltages are determinedbased on a type of data stored in the second set of memory cells.
 23. Astorage device comprising a non-volatile memory device, a memorycontroller, and a hardware interface, wherein: the hardware interface isoperable to receive data to be stored in memory cells of thenon-volatile memory device from a computer system coupled to thehardware interface; and the memory controller is configured to maintainthe received data when stored in the memory cells using a methodcomprising: generating one or more output values from a first set ofmemory cells of the non-volatile memory device, the one or more outputvalues being based on one or more values previously stored in the firstset of memory cells, the one or more output values being generated usingthreshold voltages that are different than a threshold voltage usedduring normal operation of the first set of memory cells; receivingfirst date information stored in the non-volatile memory deviceindicating when the first set of memory cells was programmed and seconddate information stored in the non-volatile memory device indicatingwhen a second set of memory cells was programmed, data in the second setof memory cells being independent of the first set of memory cells;comparing the output values from the first set of memory cells of thenon-volatile memory device to one or more first expected output values;and based at least in part on the first date information, the seconddate information, and on the comparing of the output values from thefirst set of memory cells of the non-volatile memory device to the oneor more first expected output values and without separately comparingoutput values from the second set of memory cells of the non-volatilememory device to second expected output values, programming the secondset of one or more memory cells of the non-volatile memory device torefresh the data in the second set of memory cells.
 24. The storagedevice of claim 23, wherein the generating comprises measuring anelectrical property of at least one cell of the first set of cells. 25.The storage device of claim 23, wherein the first expected output valuesare nominal output values expected to be generated by cells of thenon-volatile memory device when programmed with an expected pattern. 26.The storage device of claim 23, wherein the non-volatile memory deviceincludes one or more pages of physical memory, the pages of physicalmemory being the smallest unit of the non-volatile memory device thatcan be erased; the pages of physical memory comprise two or more sectorsof physical memory; and each cell of the first set of cells is locatedin identically-addressed respective sectors relative to each respectivepage of physical memory included in the non-volatile memory device. 27.The storage device of claim 23, wherein the method further comprisesgenerating one or more second output values from the first set of memorycells, the second output values being based on the previously-storedvalues, wherein: the output values are first output values; and thecomparing comprises comparing the first output values, the second outputvalues, the first date information, the second date information, and theexpected output values using a pre-selected threshold.
 28. The storagedevice of claim 23, wherein the different threshold voltages are basedon a tolerance value for an electrical property of the non volatilememory device.
 29. The storage device of claim 23, wherein refreshingthe data in the second set of memory cells comprises: copying existingdata in the second set of memory cells to another location in memory;erasing the existing data in the second set of memory cells; andreprogramming the second set of memory cells with the copied data,wherein the data is reprogrammed to predetermined voltages.
 30. Thestorage device of claim 23, wherein refreshing the data in the secondset of memory cells comprises: adjusting an amount of charge stored inthe second set of memory cells to reflect a nominal amount of charge fora desired programmed state.
 31. The storage device of claim 23, whereinthe different threshold voltages are determined based on a type of datastored in the second set of memory cells.